import { openBuildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
    //树形列表数据接口
    getTreeList: {
        url: '/adminc/v1/config_manage/b_code_sort/get_code_sort_list',
        method: 'get'
    },
    //表格数据接口
    getCodeList: {
        url: '/adminc/v1/config_manage/b_code/get_code_list',
        method: 'get'
    },
    //表格保存功能接口
    saveCode: {
        url: '/adminc/v1/config_manage/b_code/save_code',
        method: 'post'
    },
    //表格删除功能接口
    deleteCode: {
        url: '/adminc/v1/config_manage/b_code/delete_code',
        method: 'delete'
    },
    //树形菜单添加节点
    addTreeNode: {
        url: "/adminc/v1/config_manage/b_code_sort/create_code_sort",
        method: "post"
    },
    //树形菜单删除节点
    deleteTreeNode: {
        url: '/adminc/v1/config_manage/b_code_sort/delete_code_sort',
        method: 'delete'
    },
    //树形菜单修改节点
    editTreeNode: {
        url: '/adminc/v1/config_manage/b_code_sort/update_code_sort',
        method: 'put'
    }
}

export default openBuildService(settings)